count occurrences of char in string python